#ifndef INC_COLLISION_H_
#define INC_COLLISION_H_

#include <d3dx9.h>
#include <vector>
#include "coldet.h" 

#define  NUM_MAX_COLLPOINTS 10


class CCollisionManager
{


private:
	
	static CCollisionManager*	myCollisionManager; //Para que sea singleton
	bool						m_ModeCollision;
	LPD3DXMESH					m_SphereGunCollision;
	bool						m_paintImpactGunCollision;
	D3DXVECTOR3					m_ImpactGunCollision;
	CollisionModel3D*			m_pCollObj;

	D3DXVECTOR3					m_vecCollPoints[NUM_MAX_COLLPOINTS];
	int							m_indexVecCollPoints;

public:

	CCollisionManager();
	~CCollisionManager();
	
	void						CleanUp							( void );
	static CCollisionManager *	GetInstance						( void );
	
	void						AddTriangleCollisionObject		(D3DXVECTOR3 pos1, D3DXVECTOR3 pos2, D3DXVECTOR3 pos3);
	void						FinalizeCollisionObject			( void );
	bool						TestCollisionShotPlayerVSRoom	( void );
	void						Render_ImpactCollision			( LPDIRECT3DDEVICE9 device );
	void						Render_colsphere				( LPDIRECT3DDEVICE9 device,D3DXVECTOR3 pointGunCcollision );
	void						Initgeom_colsphere				( LPDIRECT3DDEVICE9 device );
	void						SetModeCollision				( bool mode );
	void						ChangeModeCollision				( void );
	bool						GetModeCollision				( void );
	bool						TestCollisionFrontCameraVSRoom	( void );
	bool						TestCollisionDownCameraVSRoom	( float & point_collisionY );
	bool						TestCollisionFrontCameraVSItems ( void );
	
};

#endif
